package com.netposa.datawarehouse.aggregator.util;

import java.math.RoundingMode;

public enum ScoreRoundingMode {
   UP("UP", RoundingMode.UP),
   DOWN("DOWN", RoundingMode.DOWN),
   CEILING("CEILING", RoundingMode.CEILING),
   FLOOR("FLOOR", RoundingMode.FLOOR),
   HALF_UP("HALF_UP", RoundingMode.HALF_UP),
   HALF_DOWN("HALF_DOWN", RoundingMode.HALF_DOWN),
   HALF_EVEN("HALF_EVEN", RoundingMode.HALF_EVEN);

   private String mode;
   private RoundingMode roundingMode;

   private ScoreRoundingMode(String mode, RoundingMode roundingMode) {
      this.mode = mode;
      this.roundingMode = roundingMode;
   }

   public String getMode() {
      return this.mode;
   }

   public RoundingMode getRoundingMode() {
      return this.roundingMode;
   }

   public static ScoreRoundingMode fromMode(String mode) {
      ScoreRoundingMode[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         ScoreRoundingMode item = var1[var3];
         if (item.getMode().equals(mode)) {
            return item;
         }
      }

      return UP;
   }
}
